package cn.dnf.pet.controller;

import cn.dnf.basic.util.JsonResult;
import cn.dnf.basic.util.PageList;
import cn.dnf.pet.domain.Pet;
import cn.dnf.pet.domain.PetType;
import cn.dnf.pet.query.PetQuery;
import cn.dnf.pet.service.IPetService;
import cn.dnf.pet.service.IPetTypeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

// @Controller
// @ResponseBody
@RestController // controller层，返回json格式数据
@RequestMapping("/petType")
@Api(value = "宠物的API",description="宠物相关的CRUD功能")
public class PetTypeController {
@Autowired
private IPetTypeService petTypeService;

@GetMapping("/typeTree")
 public List<PetType> typeTree(){
     return petTypeService.typeTree();
 }
}
